In recent years, three-dimensional semiconductor devices have been proposed to enhance integration of circuits. For example, Japanese Unexamined Patent Application Publication No. 2013-004690 (PTL 1) discloses a NAND flash memory. Moreover, for example, Japanese Unexamined Patent Application Publication No. 2008-181978 (PTL 2) discloses a storage device using a resistive switching element. In these three-dimensional semiconductor devices, a plurality of conductive layers and a plurality of insulating layers are alternately stacked.